package com.sojson.util;

import com.sojson.config.exception.TransErrorCode;
import com.sojson.config.exception.TransException;

/**
 * 通用异常工具类
 * 
 * @author liu
 * @date 2024-03-25
 */
public class ExpUtil {

    public static void throwEx(String msg) {
        throw new TransException(msg);
    }

    public static void throwEx(int code, String msg) {
        throw new TransException(code, msg);
    }

    public static void throwEx(TransErrorCode err) {
        throw new TransException(err);
    }

    public static void throwEx(TransErrorCode err, String msg) {
        throw new TransException(err, msg);
    }

    public static void throwEx(Exception err) {
        throw new TransException(err);
    }

}